home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.tree.TreePath;
-
- class AbstractTreePath extends TreePath {
- VisibleTreeNode node;
-
- public AbstractTreePath(Object[] newPath, VisibleTreeNode node) {
- super(newPath);
- this.node = node;
- }
-
- public boolean equals(Object o) {
- if (o instanceof AbstractTreePath) {
- AbstractTreePath aTP = (AbstractTreePath)o;
- if (this.node != null && aTP.node != null && aTP.node.treeUI == this.node.treeUI) {
- if (aTP.node == this.node) {
- return true;
- }
-
- if (this.node.isValid && aTP.node.isValid) {
- return false;
- }
- }
- }
-
- return super.equals(o);
- }
-
- public AbstractTreeUI getUI() {
- return this.node.treeUI;
- }
-
- public int hashCode() {
- return super.hashCode();
- }
-
- public String toString() {
- StringBuffer aString = new StringBuffer();
- aString.append("AbstractTreePath: VN ");
- if (this.node != null) {
- aString.append(this.node.hashCode() + " {");
- } else {
- aString.append("NULL {");
- }
-
- if (super.path != null) {
- for(int counter = 0; counter < super.path.length; ++counter) {
- if (counter > 0) {
- aString.append(", ");
- }
-
- aString.append(super.path[counter].toString());
- }
- }
-
- aString.append("}");
- return aString.toString();
- }
- }
-